Offers an interface to work with fonts. More...
Public Member Functions | |
| Font () noexcept | |
| virtual | ~Font () |
| nkMemory::StringView | getName () const |
| nkMemory::StringView | getFaceName () const |
| unsigned int | getSize () const |
| bool | getDefault () const |
| bool | getReadyForUse () const |
| void | setName (nkMemory::StringView value) |
| void | setFaceName (nkMemory::StringView value) |
| void | setSize (unsigned int value) |
| void | setDefault (bool value) |
| virtual void | load ()=0 |
| virtual void | unload ()=0 |
| void | reload () |
Static Public Member Functions | |
| static nkMemory::UniquePtr< Font > | create (System *system=nullptr) |
Offers an interface to work with fonts.
Fonts are available to customize the way text is rendered inside the UI components.
|
noexcept |
Constructor.
|
virtual |
Destructor.
| nkMemory::StringView nkWinUi::Font::getName | ( | ) | const |
| nkMemory::StringView nkWinUi::Font::getFaceName | ( | ) | const |
| unsigned int nkWinUi::Font::getSize | ( | ) | const |
| bool nkWinUi::Font::getDefault | ( | ) | const |
| bool nkWinUi::Font::getReadyForUse | ( | ) | const |
| void nkWinUi::Font::setName | ( | nkMemory::StringView | value | ) |
Sets the name of the font, as referred for resource managing.
| value | The name to use. |
| void nkWinUi::Font::setFaceName | ( | nkMemory::StringView | value | ) |
Sets the face name to use.
| value | The face name to use. |
| void nkWinUi::Font::setSize | ( | unsigned int | value | ) |
Sets the font size to use.
| value | The font size to use. |
| void nkWinUi::Font::setDefault | ( | bool | value | ) |
Sets whether this font is the default one or not.
| value | If the font is the default one (true) or not (false). |
|
pure virtual |
Loads the font and prepares it for rendering, given all parameters set (font face, size...).
|
pure virtual |
Unloads the font and clears the internal resources tied to it.
| void nkWinUi::Font::reload | ( | ) |
Shorthand for unloading, and reloading the font.
|
static |
Creates a standalone resource, linking it to a system, but no manager. This method can be used to allocate a resource and manually manage its lifetime.
| system | The system to create the resource into. If left to nullptr, then the Singleton instance will be used. |